<?php require_once('../Connections/sepolwan_connect.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_data_berita = "SELECT * FROM artikel ORDER BY id DESC LIMIT 6";
$data_berita = mysql_query($query_data_berita, $sepolwan_connect) or die(mysql_error());
$row_data_berita = mysql_fetch_assoc($data_berita);
$totalRows_data_berita = mysql_num_rows($data_berita);
?>
	<ul id="slideshow">
		<?php do { ?>
	    <li>
		    <h3><a target="_parent" href="<?php include "../txt/url.txt" ?>detail-<?php echo $row_data_berita['id']; ?>/<?php echo str_replace(array(' ', '`', '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '{', '}', '|', ',', ':', ';', '"', '<', '>', ',', '.', '?', '/'), '-', $row_data_berita['judul']); ?>.html"><?php echo $row_data_berita['judul']; ?></a></h3>
		    <span>../images/artikel/<?php echo $row_data_berita['image']; ?></span>
		    <p><?php echo $row_data_berita['desk']; ?></p>
		    <img src="../images/artikel/small/<?php echo $row_data_berita['image']; ?>" alt="<?php echo $row_data_berita['judul']; ?>" />
	      </li>
		  <?php } while ($row_data_berita = mysql_fetch_assoc($data_berita)); ?>
	</ul>
	<div id="wrapper">
		<div id="fullsize">
			<div id="imgprev" class="imgnav" title="Previous Image"></div>
			<div id="imglink"></div>
			<div id="imgnext" class="imgnav" title="Next Image"></div>
			<div id="image"></div>
			<div id="information">
				<h3></h3>
				<p></p>
			</div>
		</div>
		<div id="thumbnails">
			<div id="slideleft" title="Slide Left"></div>
			<div id="slidearea">
				<div id="slider"></div>
			</div>
			<div id="slideright" title="Slide Right"></div>
		</div>
	</div>
<style>

body {margin:0; background:#111; font:11px Verdana,Arial}
a { font:Verdana, Geneva, sans-serif; color:#FFF; text-decoration:none }
a:hover { text-decoration:underline }
#slideshow {list-style:none; color:#fff}
#slideshow span {display:none}
#wrapper {width:685px; margin:0px auto; display:none}
#wrapper * {margin:0; padding:0}
#fullsize {position:relative; width:685px; height:300px; padding:2px; border:1px solid #ccc; background:#000}
#information {position:absolute; bottom:0; width:685px; height:0; background:#000; color:#fff; overflow:hidden; z-index:200; opacity:.7; filter:alpha(opacity=70)}
#information h3 {padding:4px 8px 3px; font-size:14px}
#information p {padding:0 8px 8px}
#image { width:685px; height:300px;}
#image img {position:absolute; z-index:25; max-width:685px; max-height:300px;}
.imgnav {position:absolute; width:25%; height:306px; cursor:pointer; z-index:150}
#imgprev {left:0; background:url(images/left.gif) left center no-repeat}
#imgnext {right:0; background:url(images/right.gif) right center no-repeat}
#imglink {position:absolute; height:306px; width:100%; z-index:100; opacity:.4; filter:alpha(opacity=40)}
.linkhover {background:url(images/link.gif) center center no-repeat}
#thumbnails {margin-top:15px}
#slideleft {float:left; width:20px; height:81px; background:url(images/scroll-left.gif) center center no-repeat; background-color:#222}
#slideleft:hover {background-color:#333}
#slideright {float:right; width:20px; height:81px; background:#222 url(images/scroll-right.gif) center center no-repeat}
#slideright:hover {background-color:#333}
#slidearea {float:left; position:relative; width:635px; margin-left:5px; height:81px; overflow:hidden}
#slider {position:absolute; left:0; height:81px}
#slider img {cursor:pointer; border:1px solid #666; padding:2px; height:81px}
</style>
<script type="text/javascript" src="http://jsncss.wirausahanews.com/slideshow/compressed.js"></script>
<script type="text/javascript">
	$('slideshow').style.display='none';
	$('wrapper').style.display='block';
	var slideshow=new TINY.slideshow("slideshow");
	window.onload=function(){
		slideshow.auto=true;
		slideshow.speed=5;
		slideshow.link="linkhover";
		slideshow.info="information";
		slideshow.thumbs="slider";
		slideshow.left="slideleft";
		slideshow.right="slideright";
		slideshow.scrollSpeed=4;
		slideshow.spacing=5;
		slideshow.active="#fff";
		slideshow.init("slideshow","image","imgprev","imgnext","imglink");
	}
</script>

<?php
mysql_free_result($data_berita);
?>
